Secure paging, also referred to as page swapping, within modern processors utilizes metadata for a page that is to be removed and written back to system memory or disk (e.g., paged out). The metadata is used by a processor for access control and cryptographic operations that protect secure pages. This metadata is to be saved when the page is removed from secure memory. Some of the metadata is kept secret and some of it can be safely exposed, e.g., stored outside of secure memory. Both sets of this metadata, however, are verified when reloading the page from disk. In conventional secure paging, the metadata is split between secure memory and unsecure memory, and thus paging processes also have to track this split in metadata, which complicates both write back operations (to save a page back to disk and save the metadata) and load operations (which restores the page to memory and renews access to the saved metadata). For example, processing logic executing the paging processes should calculate where each field of each set of metadata is (both in the secure and in unsecure memory) and how big each field of each set of metadata is that is to be accessed.
Furthermore, during a write back operation, a series of processor transactions occur that includes saving the metadata, encrypting the page data, and saving the encrypted page to memory and to disk. To restore the page, in most implementations, the processor copies external metadata and the encrypted page into secure memory. The processor performs an authenticated decryption operation that authenticates both the metadata and the page, and verifies either the encrypted contents or the decrypted contents. This series of processor transactions, which include the write back and load operations, is expensive in terms of processing resources and clock cycles.